﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Simple.Repository.Models.Article
{
    /// <summary>
    /// 文章分类表
    /// </summary>
    public class ArticleCategory : BusinessFullEntityBase<Guid>
    {

        /// <summary>
        /// 分类名称
        /// </summary>
        public string CategoryName { get; set; } = "";

        /// <summary>
        /// 是否显示
        /// </summary>
        public bool? IsShow { get; set; } = true;

        /// <summary>
        /// 排序
        /// </summary>
        public int SortValue { get; set; } = 0;

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; } = "";

        /// <summary>
        /// 分类文章列表
        /// </summary>
        public List<ArticleManage> ArticleManages = new List<ArticleManage>();

        public override void ConfigureEntity(ModelBuilder builder)
        {
            builder.Entity<ArticleCategory>(entity =>
            {
                entity.ToTable("Article_Category");
            });
        }
    }
}
